Vue.component('Detail', {
	template: `
		<el-dialog title="查看详情" width="600px" class="icon-dialog" :visible.sync="show" @open="open" :before-close="closeForm" append-to-body>
			<table cellpadding="0" cellspacing="0" class="table table-bordered" align="center" width="100%" style="word-break:break-all; margin-bottom:30px;  font-size:13px;">
				<tbody>
					<tr>
						<td class="title" width="100">审批：</td>
						<td>
							<span v-if="form.status == '0'">待审批</span>
							<span v-if="form.status == '1'">审批通过</span>
							<span v-if="form.status == '2'">审批不通过</span>
						</td>
					</tr>
					<tr>
						<td class="title" width="100">添加时间：</td>
						<td>
							{{parseTime(form.add_time,'{y}-{m}-{d}')}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">联系人：</td>
						<td>
							{{form.name}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">手机号码：</td>
						<td>
							{{form.mobile}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">标题：</td>
						<td>
							{{form.title}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">经营类型：</td>
						<td>
							{{form.type}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">物业类型：</td>
						<td>
							{{form.property_type}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">月租金/单位:(元)：</td>
						<td>
							{{form.sell}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">转让费/单位(万元)：</td>
						<td>
							{{form.cede}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">面积/单位(m2)：</td>
						<td>
							{{form.area}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">剩余租期：</td>
						<td>
							{{form.lease_term}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">区域：</td>
						<td>
							{{form.regoin}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">联系地址：</td>
						<td>
							{{form.contact_address}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">押付：</td>
						<td>
							{{form.deposit}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">商铺性质/(新房)(旧房)：</td>
						<td>
							{{form.shop}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">商铺类型：</td>
						<td>
							{{form.storetype}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">经营状态：</td>
						<td>
							{{form.business_status}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">房屋规格：</td>
						<td>
							{{form.specs}}
						</td>
					</tr>
					<tr>
						<td class="title" width="100">店铺描述：</td>
						<td>
							{{form.info}}
						</td>
					</tr>
				</tbody>
			</table>
		</el-dialog>
	`
	,
	props: {
		show: {
			type: Boolean,
			default: true
		},
		size: {
			type: String,
			default: 'mini'
		},
		info: {
			type: Object,
		},
	},
	data() {
		return {
			form:{
			},
		}
	},
	methods: {
		open(){
			axios.post(base_url+'/InfoSubmit/detail',this.info).then(res => {
				this.form = res.data.data
			})
		},
		closeForm(){
			this.$emit('update:show', false)
		}
	}
})
